<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>注册成功</title>
    <link rel="stylesheet" href="layui-v2.9.10/layui/css/layui.css">
    <style>
        /* 样式 */
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
            margin: 0;
            padding: 0;
        }
        .container {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }
        .layui-card {
            max-width: 400px;
            width: 100%;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        .layui-card-header {
            font-size: 24px;
            color: #009688;
            text-align: center;
            padding: 20px;
            background-color: #f2f2f2;
            border-radius: 8px 8px 0 0;
        }
        .layui-card-body {
            padding: 20px;
            text-align: center;
        }
        .link {
            color: #009688;
            text-decoration: underline;
            cursor: pointer;
        }
        .link:hover {
            color: #005e52;
        }
    </style>
</head>
<body>

<div class="container">
    <div class="layui-card">
        <div class="layui-card-header">注册失败</div>
        <div class="layui-card-body">
            <p>抱歉，注册失败。请稍后再试。</p>
            <p><span id="countdown">5</span>秒后将自动跳转到<a href="../home/register.jsp" class="link">登录页面</a>。</p>
        </div>
    </div>
</div>

<script>
    var countdown = document.getElementById('countdown');
    var secondsLeft = 5;

    function updateCountdown() {
        countdown.textContent = secondsLeft;
        if (secondsLeft > 0) {
            secondsLeft--;
            setTimeout(updateCountdown, 1000); // 每秒更新倒计时
        } else {
            window.location.href = '../home/login.jsp'; // 倒计时结束后跳转
        }
    }

    updateCountdown();
</script>

</body>
</html>
